//
//  DetailTableViewCell.m
//  GiftItems
//
//  Created by lanou3g on 15/9/23.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "DetailTableViewCell.h"

@implementation DetailTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _steplabel = [[UILabel alloc] initWithFrame:CGRectMake(30, 10, kWidth - 30 * 2, 50)];
        _steplabel.numberOfLines = 0;
        [self.contentView addSubview:_steplabel];
    }
    return self;
}
- (void)sendModel:(DetailModel *)model{
    CGRect rect = [model.article boundingRectWithSize:CGSizeMake(kWidth - 30 * 2, 1000) options:NSStringDrawingUsesLineFragmentOrigin attributes:[NSDictionary dictionaryWithObject:[UIFont systemFontOfSize:14] forKey:NSFontAttributeName] context:nil];
    _steplabel.frame = CGRectMake(30, 10, kWidth - 30 * 2, rect.size.height + 10);
    _steplabel.font = [UIFont systemFontOfSize:14];
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
